package org.kotboot.ctrl

import org.kotboot.domain.Dict
import org.kotboot.module.R
import org.kotboot.service.DictServ
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RequestMethod
import org.springframework.web.bind.annotation.RestController
import javax.annotation.Resource

@RequestMapping(value = "/dict")
@RestController
class DictCtrl(

        @Resource val dictServ: DictServ
) : BaseCtrl(){

    @RequestMapping(value = "/insert" ,method = arrayOf(RequestMethod.GET))
    fun insert(dict : Dict) : R<*>{
        return dictServ.insert(dict.k)
    }
}